//
//  ZNetManager.h
//  cnwan
//
//  Created by Apple on 2018/6/26.
//  Copyright © 2018年 xchuang. All rights reserved.
//

#import <Foundation/Foundation.h>
@interface ZNetManagerHandler : NSObject
@end



@interface ZNetManager : NSObject
+ (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
                               parameters:(nullable id)parameters
                                  success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                  failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
//put请求
+ (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
                            parameters:(nullable id)parameters
                               success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                               failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;

+ (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
                            parameters:(nullable id)parameters
                               success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                               failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;


+ (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
                             parameters:(nullable id)parameters
                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;


+ (nullable NSURLSessionDataTask *)POSTMessage:(NSString *)URLString
                                 images:(NSArray *)images
                             parameters:(nullable id)parameters
                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
//创建新的社群
+ (nullable NSURLSessionDataTask *)PostCreatGroupInfo:(NSString *_Nullable)urlStr
                                                param:(id)param
                                                image:(NSData *_Nullable)imageData
                                        compleHandler:(void(^_Nullable)(id _Nullable resposeObject ,NSError * _Nullable error))compleHandler;
@end
